package com.nil.codegen.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_datasource")
@ApiModel(value="DataSource对象", description="数据源")
public class DataSource extends BaseEntity implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId
    private String id;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "驱动类型")
    @TableField("driver_type")
    private String driverType;

    @ApiModelProperty(value = "主机")
    @TableField("host")
    private String host;

    @ApiModelProperty(value = "端口")
    @TableField("port")
    private Integer port;

    @ApiModelProperty(value = "数据库连接url")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "登录用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "登录密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "数据库名")
    @TableField("db_name")
    private String dbName;

    @ApiModelProperty(value = "模式")
    @TableField("`schema`")
    private String schema;

}
